﻿//产品搜索
function searchproduct() {
    var productNo = document.getElementById('ProductNO').value;
    if (productNo == '<%=GetLangString("ItemCode")%>')
        productNo = '';

    alert(productNo == '<%=GetLangString("ItemCode")%>');
    var desc = document.getElementById('ProductDesc').value;
    if (desc == '<%=GetLangString("DetailDescription")%>')
        desc = '';
    
    var brandid = document.getElementById("brand").value;
    if (productNo == '' && desc == '' && brandid != '0') {
        window.location.href = 'Category.aspx?BrandID=' + brandid;
    }
    else {
        window.location.href = 'Product.aspx?type=1&BrandID='
         + brandid + '&Desc='
         + encodeURI(desc)
         + '&KeyWords=' + encodeURI(productNo);
    }
    return false;
}
function srchSubmit() {
    var pno = '<%=KeyWords%>';
    var bid = '<%=BrandID%>';
    var dsc = '<%=Desc%>';
    if (pno != '')
        document.getElementById('ProductNO').value = pno;
    if (dsc != '')
        document.getElementById('ProductDesc').value = dsc;

}